﻿using Grow.Domain.Object;

namespace Grow.Domain.Repository.CreateDomainRepository
{
    /// <summary>
    /// 实体 属性构建器
    /// </summary>
    /// <typeparam name="TEntity"></typeparam>
    /// <typeparam name="TProperty"></typeparam>
    public interface IEntityPropertyBuilder<TEntity, TProperty>
         where TEntity : class, IEntity
    {
        /// <summary>
        /// 字段长度 String
        /// </summary>
        /// <param name="maxLength"></param>
        /// <returns></returns>
        IEntityPropertyBuilder<TEntity, TProperty> HasMaxLength(int maxLength);

        /// <summary>
        /// 小数点长度
        /// </summary>
        /// <param name="precision">小数点前长度</param>
        /// <param name="scale">小数点后长度</param>
        /// <returns></returns>
        IEntityPropertyBuilder<TEntity, TProperty> HasPrecision(int precision, int scale);

        /// <summary>
        /// 整数长度
        /// </summary>
        /// <param name="precision">长度</param>
        /// <returns></returns>
        IEntityPropertyBuilder<TEntity, TProperty> HasPrecision(int precision);

        /// <summary>
        /// 备注
        /// </summary>
        /// <param name="comment">备注</param>
        /// <returns></returns>
        IEntityPropertyBuilder<TEntity, TProperty> HasComment(string comment);
    }
}
